import { ExclamationCircleOutlined } from '@ant-design/icons';
import { replaceContent } from '@/utils';
// css
import styles from '@/styles/CommonOrder.module.scss';

export default function ({ data: { goodsName, goodsExtendName, predefinedInstructions } }) {
    if(!goodsName){
        return <></>
    }
    return (
        <div className={styles['product-info']}>
            <h1>{goodsName}</h1>
            <h3>{goodsExtendName}</h3>
            <div className={styles['product-tip']}>
                <span><ExclamationCircleOutlined /> 购买须知：</span>
                <p dangerouslySetInnerHTML={{__html: replaceContent(predefinedInstructions)}}></p>
            </div>
        </div>
    )
}